/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.palomino.servicios;

import javax.jws.WebService;
import javax.jws.WebMethod;
import javax.jws.WebParam;

/**
 *
 * @author JONATHAN
 */
@WebService(serviceName = "SVOracle_General")
public class SVOracle_General {

    /**
     * Web service operation
     */
    @WebMethod(operationName = "listener_principal")
    public Object listener_principal(@WebParam(name = "var_entrada") Object var_entrada) {
        Object[] lobDatos = null;
        Object loResul = null;
        String sSesion = "0";
        lobDatos = (Object[]) var_entrada;
        sSesion = (String) lobDatos[0];
        if (lobDatos == null || lobDatos.length < 2 || lobDatos[1] == null) {
            //Traza.error("Error de Objeto de petición",sSesion );
            return null;
        }

        try {
            String lsMetodo = (String) lobDatos[1];
            String lsDatos = (String) lobDatos[0];

            if (lsMetodo.equals("EJMRS")) // Sentencia MonoRegistro dependiente de Sesión.
            {
                String[] lasTipos = null;
                lasTipos = (String[]) lobDatos[5];
                loResul = (Object) TLOracle_General.ejecutaSentenciaMRS(lsDatos, false, (String) lobDatos[2], (String[]) lobDatos[3], (Object[]) lobDatos[4], lasTipos, true, true);
            }
        } catch (Exception e) {
            loResul=e;
        }

        return loResul;
    }
}
